
#ifndef __IO_OFFS_H__
#define __IO_OFFS_H__

#include <fstream>

extern float         *mesh_pos;
extern float         *mesh_normals;
extern unsigned int  *mesh_faces;
extern int           nfaces;
extern int           nvertices;

extern int           *idCP; // control points identifiers
extern int           NCTRLPOINTS;

/// Read an OFF file
/// @arg in input file stream
/// @return true if it succeed
bool readOFFfile(std::ifstream&);

/// Save an OFF file
/// @arg in input file stream
/// @return true if it succeed
bool saveOFFfile(std::ofstream&);

/// Read an CP file
/// @arg in input file stream
/// @return true if it succeed
bool readCPfile(std::ifstream&);

extern "C" bool readOFFfile(const char*);
extern "C" bool saveOFFfile(const char*);
extern "C" bool readCPfile(const char*);

#endif
